#ifndef _HAL_SERIAL_CONSOLE_H_
#define _HAL_SERIAL_CONSOLE_H_

#include "bsp.h"

#define USART_CMD_MS  2

#define MAX_FNAME_LEN 		30											   
#define MAX_PARM 			10
#define PARM_LEN 			200
#define RX_BUFF_LEN 		256

#ifndef MAX_ARGC
#define MAX_ARGC 	        36
#endif
#ifndef LOG_SERVICE_BUFLEN
#define LOG_SERVICE_BUFLEN     64
#endif

typedef void (*log_act_t)(void *);

struct _hal_serial_str_cmp
{
	char* name;
	log_act_t func;
};

typedef struct _hal_console_dev
{
    // int         (*usmart_scan)(void);
    uint8_t     API_Match_flag;
    uint8_t     debug_flag;
    char        USMART_RX_BUF[RX_BUFF_LEN];
    uint16_t    (*func_num)(void);
    struct _hal_serial_str_cmp  *func_list;
}ConsoleDev_S;


extern ConsoleDev_S console_dev;

uint8_t hal_console_parse_param(char *buf, char **argv);
void hal_serial_console_task_init(void);

#endif
